-- GENERATED SPELL FOR [Mad Voidwalker] --


function spell0_15146(pUnit, Event) --@Consuming Shadows,Self--
pUnit:FullCastSpellOnTarget(24614,pUnit)
pUnit:RegisterEvent('Sorts_15146', 15000, 1)
end

function spell1_15146(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(24616,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15146', 621, 1)
end

function Sorts_15146(pUnit, Event)
local choix_sorts_15146 = math.random(0, 1)
if choix_sorts_15146 == 0 then
pUnit:RegisterEvent('spell0_15146', 1, 1)
end
if choix_sorts_15146 == 1 then
pUnit:RegisterEvent('spell1_15146', 1, 1)
end
end

function mob15146_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15146', math.random(1500, 3000), 1)
end

function mob15146_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15146_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15146_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15146, 1, 'mob15146_Action')
RegisterUnitEvent(15146, 2, 'mob15146_Leave')
RegisterUnitEvent(15146, 3, 'mob15146_Kill')
RegisterUnitEvent(15146, 4, 'mob15146_Die')
